<p-dialog [(visible)]="display" modal="modal"  [responsive]="true" [width]="width" (onHide)="closeIntervalMask(false)" class="intervaloreder" >
  <p-header>
    <!--{{title}}-->
    {{this.inpectionOrder['title']}}
  </p-header>
  <div class="ui-g my-datatable">
    <div class="ui-g-12">
      <div class="mysearch">
        <label>开始时间:&nbsp;&nbsp;</label>{{this.inpectionOrder.start_time}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <label>结束时间:&nbsp;&nbsp;</label>{{this.inpectionOrder.end_time}}
      </div>
      <div class="file-box" >
        <p-dataTable [value]="inspections"
                     [totalRecords]="totalRecords"  [(selection)]="selectInsepections" (onEditComplete)="tableEditComplete($event)" [editable]="true">
          <ng-container *ngFor="let col of cols">
            <p-column   field="{{col.field}}" header="{{col.header}}"  [editable]="col.editable"></p-column>
          </ng-container>
          <ng-template pTemplate="emptymessage">
            当前没有数据
          </ng-template>
          <p-column header="巡检记录值" [editable]="isEditable(inpectionOrder['status'])" field="real_value" >

            <ng-template  let-rowData="rowData" pTemplate="body">
              <span>{{ rowData.real_value}}</span>
            </ng-template>
            <ng-template  let-rowData="rowData" pTemplate="editor" >
              <p-dropdown [options]="insepectionvalue" [autoWidth]="false" [(ngModel)]="rowData.real_value" [style]="{'width':'100%'}"
                          appendTo="body" required="true" *ngIf="rowData.showSelect"></p-dropdown>
              <input type="number" [(ngModel)]="rowData.real_value" *ngIf="!rowData.showSelect" class="input-foucs">
            </ng-template>

            <!--<ng-container>-->
            <!--&lt;!&ndash;<ng-template  let-rowData="rowData" pTemplate="body" *ngIf="rowData.showSelect">&ndash;&gt;-->
            <!--&lt;!&ndash;<span>{{ rowData.real_value}}</span>&ndash;&gt;-->
            <!--&lt;!&ndash;</ng-template>&ndash;&gt;-->
            <!--<ng-template  pTemplate="editor">-->
            <!--<input type="tel" [(ngModel)]="rowData.real_value">-->
            <!--</ng-template>-->
            <!--</ng-container>-->
          </p-column>
          <p-column [editable]="isEditable(inpectionOrder['status'])" field="remark" header="备注">
          </p-column>
        </p-dataTable>
        <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>
      </div>
    </div>
  </div>
  <p-footer>
    <button type="button" pButton icon="fa-check"  label="保存" (click)="saveIntervalOrder(false)" [disabled]="!canSubmit"></button>
    <button type="button" pButton icon="fa-close"  label="关闭" (click)="closeIntervalMask(false)"></button>
  </p-footer>
</p-dialog>
